package com.zzyl.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zzyl.base.PageResponse;
import com.zzyl.dto.NursingProjectPageDTO;
import com.zzyl.mapper.NursingProjectMapper;
import com.zzyl.service.NursingProjectService;
import com.zzyl.vo.NursingProjectVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * wangcong
 * 2025/1/10 14:24
 */
@Service
public class NursingProjectServiceImpl implements NursingProjectService {

    @Autowired
    private NursingProjectMapper nursingProjectMapper;

    @Override
    public PageResponse<NursingProjectVO> pageQuery(NursingProjectPageDTO nursingProjectPageDTO) {
        PageHelper.startPage(nursingProjectPageDTO.getPageNum(), nursingProjectPageDTO.getPageSize());
        Page<NursingProjectVO> page=nursingProjectMapper.pageQuery(nursingProjectPageDTO);
        return PageResponse.of(page, NursingProjectVO.class);
    }
}
